-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update to main for core #75
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let you merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for later -- there's no shared test for these gateways in this repo (unless this PR adds one) and most of this behavior is shared
// } | ||
// if (!dataStore.ebOpts.store.stores.base) { | ||
// throw new Error("Loader stores.base is not defined"); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better
const { store } = getStore(url, this.sthis, (...args) => args.join("/")); | ||
|
||
const rParams = url.getParamsResult("uploadUrl", "key", "name"); | ||
if (rParams.isErr()) { | ||
return this.logger.Error().Url(url).Err(rParams).Msg("Put Error").ResultError(); | ||
} | ||
const { uploadUrl, key, name } = rParams.Ok(); | ||
const body = await rt.gw.fpSerialize(this.sthis, fpEnv, url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧙
@@ -147,34 +140,22 @@ export class AWSGateway implements bs.Gateway { | |||
} | |||
} | |||
|
|||
private async getData(url: URI): Promise<bs.GetResult> { | |||
async getRaw(url: URI): Promise<Result<Uint8Array>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -52,7 +52,7 @@ export const connect: ConnectFunction = ( | |||
return connectionCache.get(urlObj.toString()).once(() => { | |||
makeKeyBagUrlExtractable(sthis); | |||
const connection = connectionFactory(sthis, urlObj); | |||
connection.connect_X(blockstore); | |||
connection.connect(crdt.blockstore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙂
const connection = rawConnect(db, doc.remoteName, URI.from(doc.endpoint).toString()); | ||
const connectURI = URI.from(dashboardURI).build().pathname("/fp/databases/connect"); | ||
connectURI.defParam("localName", dbName); | ||
connectURI.defParam("remoteName", doc.remoteName); | ||
if (doc.endpoint) { | ||
connectURI.defParam("endpoint", doc.endpoint); | ||
if (endpoint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -85,35 +86,32 @@ export class NetlifyGateway implements bs.Gateway { | |||
return Result.Err(new Error("Remote base URL not found in the URI")); | |||
} | |||
const fetchUrl = BuildURI.from(remoteBaseUrl); | |||
switch (store) { | |||
let body: Uint8Array; | |||
switch (fpenv.type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is easier to work with
base: process.env.FP_STORAGE_URL, | ||
}, | ||
storeUrls: { | ||
base: process.env.FP_STORAGE_URL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better!
this should merge first, then merge #78 |
No description provided.